#include "Common/Point2D.hpp"

Point2D::Point2D()
    : m_x(0), m_y(0)
{
}

Point2D::Point2D(double x, double y)
    : m_x(x), m_y(y)
{
}

Point2D::Point2D(const Point2D &p)
{
    m_x = p.m_x;
    m_y = p.m_y;
}

double Point2D::x() const
{
    return m_x;
}

double Point2D::y() const
{
    return m_y;
}

void Point2D::setX(double x)
{
    m_x = x;
}

void Point2D::setY(double y)
{
    m_y = y;
}

Point2D& Point2D::operator=(const Point2D &p)
{
    m_x = p.m_x;
    m_y = p.m_y;
    return *this;
}

bool Point2D::operator==(const Point2D &p) const
{
    return ( m_x == p.m_x ) && ( m_y == p.m_y );
}
